import java.util.Map;

// 510510
public class P69 {
	public static long phi(long x) {
		Map<Long, Long> m = Util.primeFactor(x);
		//System.out.println(m);
		Long[] primes = m.keySet().toArray(new Long[0]);
		for (Long p : primes) {			
			x /= p;
			x *= (p - 1);
		}
		
		return x;
		
	}
	public static void main(String[] args) {
		float max = 0;
		long maxN = 0;
		
		for (long i = 2; i <= 1000000; i++) {
			
			long count = phi(i);
			
			float mu = (float)i/(float)count;
			System.out.println(i + "," + count);
			
			if (max < mu) {
				max = mu;
				maxN = i;				
			}
		}	
		
		System.out.println(max);
		System.out.println(maxN);
	}
}
